<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta content="text/html;charset=utf-8"></meta>
    <title>Hello World!</title>
    <script src="/jquery.min.js"></script>
    <script src="/jquery.cookie.min.js"></script>
</head>
<body>
<div class="container">
    <p>
        <span>用户名：<span id="sp_userName"></span></span>
    </p>
</div>
<script >
    $(function () {
        $("#sp_userName").html($.cookie("userName"));
    })


</script>
</body>
</html>